package org.xteam.camllight.io;

import java.io.IOException;
import java.io.RandomAccessFile;

public class RandomAccessFileImpl implements IFile {

	private RandomAccessFile file;

	public RandomAccessFileImpl(RandomAccessFile file) {
		this.file = file;
	}

	public int read(byte[] buffer, int offset, int length) throws IOException {
		return file.read(buffer, offset, length);
	}

	public void close() {
		try {
			file.close();
		} catch (IOException e) {
		}
	}

	public void write(byte[] buffer, int offset, int length) throws IOException {
		file.write(buffer, offset, length);
	}

}
